home *** CD-ROM | disk | FTP | other *** search
-
- #define EXTERN extern
- #include "INIPGMS.h"
-
- int FileList2DlgBox( hWndDlg, ID_List, Mask )
- HWND hWndDlg ;
- USHORT ID_List ;
- PSZ Mask ;
- {
- CHAR buffer[80] ;
- FILEFINDBUF findbuf ;
- HDIR hDir = 1 ;
- USHORT usSearchCount = 1 ;
-
- WinSendDlgItemMsg (hWndDlg, ID_List, LM_DELETEALL, NULL, NULL) ;
- if( DosFindFirst (Mask, &hDir, 0x0007, &findbuf, sizeof findbuf, &usSearchCount, 0L) )
- return( -1 );
- while(usSearchCount)
- {
- sprintf(buffer,"%s",findbuf.achName);
- WinSendDlgItemMsg(hWndDlg, ID_List, LM_INSERTITEM,
- MPFROM2SHORT (LIT_SORTASCENDING, 0),
- MPFROMP (buffer)) ;
- DosFindNext (hDir, &findbuf, sizeof findbuf, &usSearchCount) ;
- }
- DosFindClose( hDir ) ;
- return( 0 ) ;
- } /* End of FileList2DlgBox */
-